$("#adtvmout").click(function () {
    window.location.href = '/admin/report/index';
});
$(".status_type").click(function () {
    var check_val = $('input[name="status"]:checked').val();
    if(check_val==1){
        $(".shenhe").hide();
    }else{
        $(".shenhe").show();
    }
})
$("#adtvmadd").click(function () {
    var data = $("#adtvminfo").serialize();
    var id = $("input[name='id']").val();
    var status_type =$('input[name="status"]:checked').val();
    if(status_type==2){
        var reason = $.trim($(".reasons").val());
        if(reason==''){
            dshow("审核不通原因不能为空");
            return false;
        }
    }
    $.ajax({
        url: '/admin/report/examineInfo',
        type: 'POST',
        data: data,
        dataType: 'JSON',
        cache: false,
        success: function (json) {
            if (json.code == 2000) {
                if (id != '') {
                    history.back(-1);
                } else {
                    window.location.href = '/user/index'
                }
            } else {
                dshow(json.message);
            }
        }
    });
});